﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SprAdmin.aspx.cs" Inherits="EuroAudit.SprAdmin" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
    <script type="text/javascript">
    
      function pageLoad() {
      }
      function OpenModal() {
          var MessageSource = "cmdDel";
          var MessageText = "Saraksta dati tiks dzēsti. Vai turpināt?";
          var WinSettings = "center:yes;resizable:no;dialogHeight:200px;status:no";
          var RetVal = window.showModalDialog("ModalDlg.aspx", MessageText, WinSettings);
          //__doPostBack("cmdDelLn", "");
          //__doPostBack("cmdDel","");
          //$get('cmdDel').click();
          if (document.getElementById("_RESULT").textContent != "undefined")
              document.getElementById("_RESULT").textContent = RetVal + MessageSource;
          if (document.getElementById("_RESULT").innerText != "undefined")
              document.getElementById("_RESULT").innerText = RetVal + MessageSource;
          //document.getElementById('_RESULT').innerText = RetVal + MessageSource;
          __doPostBack('_RESULT', '');
      }
      function overlay() {
          xyz = document.getElementById("overlay");
          xyz.style.visibility = (xyz.style.visibility == "visible") ? "hidden" : "visible";

      }

    </script>
    <link href="Style.css" rel="stylesheet" type="text/css" />
</head>
<body class="PageMain">
    <form id="form1" runat="server">
    <div id="overlay">
        <div align="center">
            <asp:Label ID="lblDelSpr" runat="server" CssClass="LabelFieldCaption" Text="Saraksta dati tiks dzēsti. Vai turpināt?"></asp:Label>
            <br />
            <asp:Button ID="cmdDelOKSpr" runat="server" CssClass="cmdDel" OnClientClick="overlay()"
                OnClick="cmdDel_Click" Text="OK" />
            <asp:Button ID="cmdDelCancel" runat="server" CssClass="cmdClose" OnClientClick="overlay()"
                Text="Cancel" />
        </div>
    </div>
    <div align="center">
        <br />
        <asp:Label ID="lblCaption" runat="server" CssClass="LabelFieldCaption" 
            Text="Sarakstu rediģēšana"></asp:Label>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
    </div>
    <div>
    
        <asp:Button ID="cmdNew" runat="server" CssClass="cmdNew" onclick="cmdNew_Click" 
            Text="Jauns ieraksts" Visible="False" />
    
    </div>
    <asp:UpdatePanel ID="upEdit" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pEdit" runat="server" CssClass="PanelEdit" Height="797px" 
                Visible="False">
                <asp:TextBox ID="txtRecID" runat="server" CssClass="FieldsUnvisible"></asp:TextBox>
                <a name="pEdit"></a>
                <br />
                <asp:Label ID="Label1" runat="server" CssClass="LabelFieldCaption" 
                    Text="Saraksta grupa"></asp:Label>
                <br />
                <asp:DropDownList ID="ddlSprID" runat="server" CssClass="FieldsDropDown" 
                    onselectedindexchanged="ddlSprID_SelectedIndexChanged">
                </asp:DropDownList>
                <br />
                <asp:Label ID="Label2" runat="server" CssClass="LabelFieldCaption" 
                    Text="Ieraksta ID"></asp:Label>
                <br />
                <asp:TextBox ID="txtNosID" runat="server" CssClass="FieldsText" ReadOnly="True"></asp:TextBox>
                <br />
                <asp:Label ID="Label3" runat="server" CssClass="LabelFieldCaption" 
                    Text="Ieraksta nosaukums"></asp:Label>
                <br />
                <asp:TextBox ID="txtNos" runat="server" CssClass="FieldsText"></asp:TextBox>
                <br />
                <asp:Label ID="Label4" runat="server" CssClass="LabelFieldCaption" 
                    Text="Papildinformācija"></asp:Label>
                <br />
                <asp:TextBox ID="txtInfo" runat="server" CssClass="FieldsText"></asp:TextBox>
                <br />
                <asp:Label ID="Label5" runat="server" CssClass="LabelFieldCaption" 
                    Text="Pieejas tiesības lietotājiem"></asp:Label>
                <br />
                <asp:TextBox ID="txtAccessU" runat="server" CssClass="FieldsText"></asp:TextBox>
                <asp:Button ID="cmdShowU" runat="server" CssClass="cmdShowLists" 
                    onclick="cmdShowU_Click" Text="..." />
                <asp:GridView ID="gvAccessU" runat="server" AutoGenerateSelectButton="True" 
                    CssClass="TablePopUp" onselectedindexchanged="gvAccessU_SelectedIndexChanged" 
                    Visible="False">
                </asp:GridView>
                <br />
                <asp:Label ID="Label6" runat="server" CssClass="LabelFieldCaption" 
                    Text="Pieejas tiesības grupām"></asp:Label>
                <br />
                <asp:TextBox ID="txtAccessG" runat="server" CssClass="FieldsText"></asp:TextBox>
                <asp:Button ID="cmdShowG" runat="server" CssClass="cmdShowLists" 
                    onclick="cmdShowG_Click" Text="..." />
                <asp:GridView ID="gvAccessG" runat="server" AutoGenerateSelectButton="True" 
                    CssClass="TablePopUp" onselectedindexchanged="gvAccessG_SelectedIndexChanged" 
                    Visible="False">
                </asp:GridView>
                <asp:Label ID="Label7" runat="server" CssClass="LabelFieldCaption" 
                    Text="Rediģēšanas tiesības lietotājiem"></asp:Label>
                <br />
                <asp:TextBox ID="txtEditU" runat="server" CssClass="FieldsText"></asp:TextBox>
                <asp:Button ID="cmdShowEU" runat="server" CssClass="cmdShowLists" 
                    onclick="cmdShowEU_Click" Text="..." />
                <asp:GridView ID="gvEditU" runat="server" AutoGenerateSelectButton="True" 
                    CssClass="TablePopUp" onselectedindexchanged="gvEditU_SelectedIndexChanged" 
                    Visible="False">
                </asp:GridView>
                <div align="center">
                    <asp:Label ID="lblErr" runat="server" CssClass="LabelError"></asp:Label>
                    <br />
                    <asp:Button ID="cmdSave" runat="server" CssClass="cmdSave" 
                        onclick="cmdSave_Click" Text="Saglabāt" />
                    &nbsp;<asp:Button ID="cmdDel" runat="server" CssClass="cmdDel" 
                        onclick="cmdDel_Click" Text="Dzēst" Visible="False" />
                    <asp:Button ID="cmdDelMod" runat="server" CssClass="cmdDel" 
                        onclientclick="overlay()" Text="Dzēst" />
                    &nbsp;<asp:Button ID="cmdClose" runat="server" CssClass="cmdClose" 
                        onclick="cmdClose_Click" Text="Aizvērt" />
                    <br />
                    <asp:TextBox ID="_RESULT" runat="server" CssClass="FieldsUnvisible"></asp:TextBox>
                </div>
                <br />
            </asp:Panel>
            <br />
            <asp:UpdatePanel ID="upList" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <asp:Table ID="tSpr" runat="server" CssClass="TableList" GridLines="Both">
                    </asp:Table>
                    <br />
                    <br />
                </ContentTemplate>
            </asp:UpdatePanel>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="cmdNew" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>
    </form>
</body>
</html>
